@extends('backend.layouts.page')
@section('content')
    <form class="form-horizontal ajaxForm" action="{{url($baseRoute.'save')}}">
        <input type="hidden" name="id" value="{{$entity->id}}"/>

        <div class="form-group">
            <label class="col-xs-3 control-label required">模块名称</label>
            <div class="col-xs-9">
                <input type="text" class="form-control" value="{{$entity->name}}" placeholder="" name="name">
            </div>
        </div>
        <div class="form-group">
            @if($entity->level==1)
                <label class="col-xs-3 control-label required">图标</label>
                <div class="col-xs-6">
                    <input type="text" name="input_tag" placeholder="请输入图标" value="{{$entity->tag}}" class="form-control">
                </div>
                <div class="col-xs-3 p-t-10">
                    <a href="{{url('admin/public/icon')}}" target="_blank">系统图标库</a>
                </div>
            @else
                <label class="col-xs-3 control-label required">URL</label>
                <div class="col-xs-9">
                    <input type="text" class="form-control" value="{{$entity->url}}" placeholder="" name="url">
                </div>
            @endif
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label required">排序</label>
            <div class="col-xs-9">
                <input type="text" class="form-control" value="{{$entity->sort}}" placeholder="" name="sort">
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label required">隐藏</label>
            <div class="col-xs-9">
                <label class="lyear-radio radio-inline radio-primary">
                    <input type="radio" name="hide" value="1" @if($entity->hide) checked @endif><span>是</span>
                </label>
                <label class="lyear-radio radio-inline radio-primary">
                    <input type="radio" name="hide" value="0" @if(!$entity->hide) checked @endif><span>否</span>
                </label>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-9 col-xs-offset-3">
                <button class="btn btn-primary" type="submit">立即提交</button>
            </div>
        </div>
    </form>
@stop
